package org.deng.java.designpattern.factorypattern.simplefactory;

/**
 * packageName org.deng.java.designpattern.factorypattern.simplefactory
 *
 * @author dengjinzhang
 * @version JDK 1.8
 * @date 2024/9/28
 * @description TODO
 */
public class FoodFactory {

    public static String nodelFoodName = "牛肉面";


    public static String huangMenChickenName = "小份鸡公煲";
    public static Food makeFood(String name){
        if(name.equals("兰州拉面")){
            Food noodle = new LanZhouNoodle(nodelFoodName);
            System.out.println("兰州拉面"+noodle.getName(nodelFoodName)+"出锅啦！");
        }if(name.equals("黄焖鸡")){
            Food huangMenChicken = new HuangMenChicken(huangMenChickenName);
            System.out.println("黄焖鸡"+huangMenChicken.getName(huangMenChickenName)+"出锅啦！");
        }else {
            System.out.println("不知道你点的什么哦~");
            return null;
        }
        return null;
    }
}
